package com.dingreading.cloud.soms.util;

import com.dingreading.cloud.soms.entity.StoreFunctionSetting;

public class SomsEntityUtils {
    public static StoreFunctionSetting newStoreFunctionSetting(
            StoreFunctionSetting functionSetting, String staffUid, String staffName, String storeUid, String uid, Integer status
    ) {
        if (functionSetting == null){
            functionSetting = new StoreFunctionSetting();
            functionSetting.setStoreUid(storeUid);
            functionSetting.setFunciontUid(uid);
            functionSetting.setAddStaffUid(staffUid);
            functionSetting.setAddStaffName(staffName);
        }
        functionSetting.setStatus(status);
        functionSetting.setLastStaffUid(staffUid);
        functionSetting.setLastStaffName(staffName);
        return functionSetting;
    }
}
